<?php
/**
 * Created by PhpStorm.
 * User: liangtiehui
 * Date: 2016/4/18
 * Time: 22:15
 */

namespace Observer;

/**
 * 具体观察者
 * Class ConcreteObserver
 * @package Observer
 */
class ConcreteObserver implements Observer
{
    /**
     * 观察者名称
     * @var
     */
    private $_name;

    public function __construct($name)
    {
        $this->_name = $name;
    }

    /**
     *  更新方法
     */
    public function update()
    {
        echo 'Oberserver' . $this->_name . 'has notified.<br/>';
    }
}